package com.ktwlsoft.archivemanage.domain.business.repositoryService.guiBusiness;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.guiBusiness.IGuiGuidanceItemMapper;
import com.ktwlsoft.archivemanage.domain.dao.entity.guiBusiness.GuiGuidanceItem;

/**
 * 指导条目业务层接口实现类
 *
 * @author zhuhe on 2020-03-12 14:07:50
 * @version 1.0
 */
@Service
public class GuiGuidanceItemRepositoryService {
	
	@Autowired
	private IGuiGuidanceItemMapper guiGuidanceItemMapper;

    /**
 	 * 查询分页 on 2020-03-12 14:07:50
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param guiGuidanceItem guiGuidanceItem
 	 * @return PageInfo<GuiGuidanceItem>
 	 */
	public PageInfo<GuiGuidanceItem> findPage(int pn,int pageSize,GuiGuidanceItem guiGuidanceItem) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<GuiGuidanceItem> pageInfo = new PageInfo<GuiGuidanceItem>(guiGuidanceItemMapper.findList(guiGuidanceItem));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2020-03-12 14:07:50
	 * @param guiGuidanceItem guiGuidanceItem
	 * @return List<GuiGuidanceItem>
	 */
	public List<GuiGuidanceItem> findList(GuiGuidanceItem guiGuidanceItem) {
		return guiGuidanceItemMapper.findList(guiGuidanceItem);
	}

    /**
	 * 根据ID查询信息 on 2020-03-12 14:07:50
	 * @param id	主键
	 * @return GuiGuidanceItem
	 */
	public GuiGuidanceItem getById(Long id){
		return guiGuidanceItemMapper.getById(id);
	}

   /**
	 * 新增 on 2020-03-12 14:07:50
	 * @param guiGuidanceItem guiGuidanceItem
	 * @return int
	 */
	public int insert(GuiGuidanceItem guiGuidanceItem){
		return guiGuidanceItemMapper.insert(guiGuidanceItem);
	}

	/**
	 * 批量插入 2020-03-12 14:07:50
	 *
	 * @param list list
	 * @return int
	 */
	public int manyInsert(List<GuiGuidanceItem> list){
	    return guiGuidanceItemMapper.manyInsert(list);
	}

   /**
	 * 修改 on 2020-03-12 14:07:50
	 * @param guiGuidanceItem guiGuidanceItem
	 * @return int
	 */
	public int update(GuiGuidanceItem guiGuidanceItem){
		return guiGuidanceItemMapper.update(guiGuidanceItem);
	}

   /**
	 * 根据id集合批量删除信息 on 2020-03-12 14:07:50
	 * @param guiGuidanceItemArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> guiGuidanceItemArr){
		return guiGuidanceItemMapper.deleteByIds(guiGuidanceItemArr);
	}

   /**
	 * 根据id删除信息 on 2020-03-12 14:07:50
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return guiGuidanceItemMapper.deleteById(id);
	}
}
